package org.jsola.hr.web;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.jsola.core.Page;
import org.jsola.core.Result;
import org.jsola.hr.dto.CompanyCustomGroupingAddDTO;
import org.jsola.hr.dto.CompanyCustomGroupingUpdateDTO;
import org.jsola.hr.query.CompanyCustomGroupingQuery;
import org.jsola.hr.vo.CompanyCustomGroupingListVO;
import org.jsola.hr.vo.CompanyCustomGroupingVO;

import java.util.List;

/**
 * 自定义用工单位分组
 *
 * @author zhr
 */
@Api(tags = "hr-自定义用工单位分组")
public interface ICompanyCustomGroupingControllerAPI {

    /**
     * 新增自定义用工单位分组
     * @param companyCustomGroupingAddDTO 自定义用工单位分组新增实体
     * @return 自定义用工单位分组展示对象
     */
    @ApiOperation(value = "新增自定义用工单位分组")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "companyCustomGroupingAddDTO", dataType = "CompanyCustomGroupingAddDTO", value = "新增自定义用工单位分组", paramType = "body")
    })
    Result<CompanyCustomGroupingVO> save(CompanyCustomGroupingAddDTO companyCustomGroupingAddDTO);


    /**
     * 修改自定义用工单位分组
     * @param companyCustomGroupingUpdateDTO 自定义用工单位分组
     * @return 更新数量
     */
    @ApiOperation(value = "修改自定义用工单位分组")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "companyCustomGroupingUpdateDTO", dataType = "CompanyCustomGroupingUpdateDTO", value = "修改自定义用工单位分组", paramType = "body")
    })
    Result<Integer> update(CompanyCustomGroupingUpdateDTO companyCustomGroupingUpdateDTO);




    /**
     * 删除单个自定义用工单位分组，彻底删除
     * @param companyCustomGroupingId 自定义用工单位分组id
     * @return 删除数量
     */
    @ApiOperation(value="删除单个自定义用工单位分组，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "companyCustomGroupingId", dataType = "Long", value = "自定义用工单位分组id", paramType = "path")
    })
    Result<Integer> delete(Long companyCustomGroupingId);


    /**
     * 批量删除自定义用工单位分组，彻底删除
     * @param companyCustomGroupingIds 自定义用工单位分组id集合
     * @return 删除数量
     */
    @ApiOperation(value = "批量删除自定义用工单位分组，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "companyCustomGroupingIds", dataType = "Long[]", value = "自定义用工单位分组id数组", paramType = "body" ,allowMultiple = true)
    })
    Result<Integer> deleteBatch(Long[] companyCustomGroupingIds);


    /**
     * 根据自定义用工单位分组id查询自定义用工单位分组详情
     * @param companyCustomGroupingId 自定义用工单位分组id
     * @return 自定义用工单位分组详情
     */
    @ApiOperation(value="根据自定义用工单位分组id查询自定义用工单位分组详情")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "companyCustomGroupingId", dataType = "Long", value = "自定义用工单位分组id", paramType = "path")
    })
    Result<CompanyCustomGroupingVO> findById(Long companyCustomGroupingId);


    /**
     * 查询自定义用工单位分组
     * @param companyCustomGroupingQuery 自定义用工单位分组查询参数
     * @return page
     */
    @ApiOperation(value="查询自定义用工单位分组")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "companyCustomGroupingQuery", dataType = "CompanyCustomGroupingQuery", value = "自定义用工单位分组查询参数", paramType = "query")
    })
    Result<List<CompanyCustomGroupingListVO>> listAll(CompanyCustomGroupingQuery companyCustomGroupingQuery);


     /**
     * 分页查询自定义用工单位分组
     * @param companyCustomGroupingQuery 自定义用工单位分组查询参数
     * @return page
     */
    @ApiOperation(value="分页查询自定义用工单位分组")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "companyCustomGroupingQuery", dataType = "CompanyCustomGroupingQuery", value = "自定义用工单位分组查询参数", paramType = "query")
    })
    Result<Page<CompanyCustomGroupingListVO>> page(CompanyCustomGroupingQuery companyCustomGroupingQuery);

    /**
     * 根据租户id查找
     *
     * @return 自定义用工单位分组
     */
    Result<List<CompanyCustomGroupingListVO>> selectBySite(Integer yearly, Integer monthly, String moduleCode);

}

